# Template file for 'powerlevel10k'
pkgname=powerlevel10k
version=1.16.1
revision=1
build_helper=qemu
hostmakedepends="cmake wget git tar zsh"
short_desc="ZSH theme"
maintainer="privatewright <privateercp@protonmail.com>"
license="GPL-3.0-or-later"
homepage="https://github.com/romkatv/powerlevel10k"
distfiles="https://github.com/romkatv/powerlevel10k/archive/v${version}.tar.gz"
checksum=c81bf8ca42db47b8427d112acf525c98b1db362d67b1c8d434c0350fd72d19a2
ignore_elf_dirs=/usr/share/zsh/plugins/powerlevel10k/gitstatus/usrbin

do_build() {
	cd gitstatus
	case "$XBPS_TARGET_MACHINE" in
		*-musl) ./build -w -m ${XBPS_TARGET_MACHINE%"-$XBPS_TARGET_LIBC"};;
		*) ./build -w -m ${XBPS_TARGET_MACHINE};;
	esac
	make -C ${wrksrc} zwc minify
}

do_install() {
	vmkdir usr/share/zsh/plugins/${pkgname}
	vcopy config usr/share/zsh/plugins/${pkgname}
	vcopy gitstatus usr/share/zsh/plugins/${pkgname}
	vcopy internal usr/share/zsh/plugins/${pkgname}
	vcopy "*zsh-theme*" usr/share/zsh/plugins/${pkgname}
	vcopy "prompt*" usr/share/zsh/plugins/${pkgname}
}
